package com.day0913;

import java.util.Scanner;

public class Text6 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        double[] money = new double[5];
        double sum = 0.0;
        System.out.println("请输入本月会员消费记录:");
        for (int i = 0; i < money.length; i ++){
            System.out.print("请输入第" + (i+1) + "笔购物金额:");
            money[i] = in.nextDouble();
            sum += money[i];
        }
        System.out.println();
        System.out.println("序号\t\t金额(元)");
        for(int i = 0; i < money.length; i ++){
            System.out.println(i+1 + "\t\t\t" + money[i]);
        }
        System.out.println("总金额\t\t" + sum);
    }
}
